package com.tiger.cmpeb.sample4;

import java.rmi.RemoteException;
import java.util.Collection;
import java.util.Date;

import javax.ejb.CreateException;
import javax.ejb.EJBException;
import javax.ejb.EntityBean;
import javax.ejb.EntityContext;
import javax.ejb.RemoveException;

public abstract class FlightBean01 implements EntityBean {
	
	private static final long serialVersionUID = 1L;
	
	private EntityContext entityContext = null;

	public abstract Integer getFlightID();

	public abstract void setFlightID(Integer flightID);

	public abstract String getFlightName();

	public abstract void setFlightName(String flightName);

	public abstract Date getDepartureDate();

	public abstract void setDepartureDate(Date departureDate);

	public abstract String getOrigin();

	public abstract void setOrigin(String orign);
	
	public abstract String getDestination();

	public abstract void setDestination(String destination);

	public abstract Collection getReservation();

	public abstract void setReservation(Collection reservation);

	public Integer ejbCreate(Integer flightID, String flightName, Date departureDate, String origin, String destination) throws CreateException {
		setFlightID(flightID);
		setFlightName(flightName);
		setDepartureDate(departureDate);
		setOrigin(origin);
		setDestination(destination);
		return flightID;
	}

	public void ejbPostCreate(Integer flightID, String flightName, Date departureDate, String origin, String destination) {

	}

	public void setEntityContext(EntityContext entityContext) throws EJBException, RemoteException {
		this.entityContext = entityContext;
	}

	public void unsetEntityContext() throws EJBException, RemoteException {
		this.entityContext = null;
	}

	public void ejbActivate() throws EJBException, RemoteException {
	}

	public void ejbLoad() throws EJBException, RemoteException {
	}

	public void ejbPassivate() throws EJBException, RemoteException {
	}

	public void ejbRemove() throws RemoveException, EJBException, RemoteException {
	}

	public void ejbStore() throws EJBException, RemoteException {
	}

}
